package com.pro.control;

import com.pro.entity.Closure;
import com.pro.entity.JsonData;
import com.pro.service.ClosureService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName: ClosureController
 * @Author: 笑笑
 * @DATE: 2021/11/13
 * @TIME: 下午 12:40
 */
@RestController
@RequestMapping("/Closure")
public class ClosureController {

    @Autowired
    private ClosureService closureService;

    //添加封停信息
    @RequestMapping("/addClosure")
    public JsonData addClosure(Closure closure) {
        Boolean aBoolean = closureService.addClosure(closure);
        return aBoolean ? JsonData.buildSuccess(aBoolean) : JsonData.buildError("添加封停信息失败");
    }
}
